#include <iostream>
#include <string>

using namespace std;
int main()
{
    string str;
    getline (cin, str);
    int len = str.size();
    int ret = -1;

    char s[256] = {0};
    for(int i = 0; i < len; ++i){
        s[str[i]]++;
    }
    
    for(int i = 0; i < len; ++i){
        if(s[str[i]] == 1){  //按字符出现顺序查找
            cout << str[i];
            ret++;
            break;
        }
    }
    
    if(ret == -1){
        cout << ret;
    }
    return 0;
}